//
//  UIButton + Extension.swift
//  sinaWeibo7110
//
//  Created by 安静清晨 on 2017/1/5.
//  Copyright © 2017年 walk-in-minds. All rights reserved.
//

import UIKit

extension UIButton{
    
    convenience init(title:String, BGImageName:String, size:CGFloat, color:UIColor) {
        
        self.init()
        
        self.setTitle(title, for: .normal)
        self.setBackgroundImage(UIImage(named:BGImageName), for: .normal)
        self.titleLabel?.font = UIFont.systemFont(ofSize: size)
        self.setTitleColor(color, for: .normal)
        self.sizeToFit()
        
        
    }
    
    
 
    
}
